﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace MulticastTV
{
    /// <summary>
    /// Picture settings form.
    /// </summary>
    public partial class PictureSettings : Form
    {
        public PictureSettings()
        {
            InitializeComponent();
        }

        private void PictureSettings_Load(object sender, EventArgs e)
        {
            // load settings
            numericUpDown1.Value = Properties.Settings.Default.PictureBrightnessV1;
            numericUpDown2.Value = Properties.Settings.Default.PictureContrastV1;
            numericUpDown3.Value = Properties.Settings.Default.PictureGammaV1;
            numericUpDown4.Value = Properties.Settings.Default.PictureSaturationV1;
            numericUpDown5.Value = Properties.Settings.Default.PictureAutoMaxCropV2;
        }

        private void saveSettings()
        {
            Properties.Settings.Default.PictureBrightnessV1 = (int)numericUpDown1.Value;
            Properties.Settings.Default.PictureContrastV1 = (int)numericUpDown2.Value;
            Properties.Settings.Default.PictureGammaV1 = (int)numericUpDown3.Value;
            Properties.Settings.Default.PictureSaturationV1 = (int)numericUpDown4.Value;
            Properties.Settings.Default.PictureAutoMaxCropV2 = (int)numericUpDown5.Value;
        
        }

        private void button1_Click(object sender, EventArgs e)
        {
            saveSettings();
            this.Close();
        }
    }
}
